<template>
    <!-- <iframe src="/public/luckyexcel-import/index.html" frameborder="0"></iframe> -->
    <div>
      <iframe id="report-iframe" frameborder="0" scrolling="yes" style="background-color:transparent; position：absolute;width: 100%;
         height:900px; top: 0;right:0;left:0;bottom:0;" src='/dimensionReport/index.html'></iframe>
    </div>
</template>
<script>
import {quotaFormula} from "@/api/quota/reportUpload/reportUpload.js"
export default {
  data(){
     reportData:[]
  },
  methods:{
    //传url值
    setUrlToIframe(){
      let arr = JSON.parse(this.$route.params.data)
      console.log('arr')
      console.log(arr)
      document.getElementById('report-iframe').onload = ()=>{
        document.getElementById('report-iframe').contentWindow.importJsonData(arr)
      }
    },
    //获取维度关联报表数据
    getQuotaFormula(){
      quotaFormula().then((res)=>{
       this.reportData = JSON.parse(res.data)

      }).catch((error)=>{
        this.$message("获取数据失败")
      })
    }
  },
  mounted(){
    // this.getQuotaFormula()
    this.setUrlToIframe()

  }
};
</script>
<style lang="stylus">
</style>
